VejalNai Chatbot: Product & QA Documentation

Date: July 2, 2026
Author: Senior QA & Product Owner
Project: VejalNai Live Chatbot & CRM
Status: SaaS-Ready (Beta Release)

1. Executive Summary

VejalNai Chatbot is a customer engagement platform designed to automate responses and manage customer communication across multiple channels (Web, Facebook, WhatsApp, Instagram). It provides a real-time admin inbox, automated bot handoffs, user profile mapping, and location/device tracking. Recent iterations have polished it into a SaaS-ready live chat engine with high responsiveness, robust error recovery, and seamless layout flow.


2. Product Features & Architecture

A. Real-Time Admin Inbox Dashboard

B. Customer-Side Chat Widget (widget.js)

C. Live Activity & Device Tracking (Crisp-Like Live Assist)


3. QA Defect Log & Resolutions

Defect ID Severity Feature Area Problem Description Resolution Details
BUG-01 Critical Inbox Thread Admin replies (sender_type = human) mapped to unstyled classes, resulting in off-screen alignments, overlapping buttons, and a broken inbox. Mapped human-sent messages to the .bot style container to align them on the right side in blue bubbles, and snapped the reply button to the outer-left edge.
BUG-02 High Messaging Typing double or single quotes in reply messages broke Javascript HTML onclick string concatenation, crashing the browser thread. Refactored Blade strings to escape JS parameters via @json / Js::from() formatting and wrapped the onclick attribute in single quotes.
BUG-03 Medium Dashboard UI Broken chevron text indicators (v and All v) rendered literally in right sidebars and list headers. Replaced all occurrences of literal v characters with proper Phosphor Icons (<i class="ph ph-caret-down"></i>).
BUG-04 Low Dashboard UI Redundant Web or channel text labels displayed below preview messages in the sidebar, cluttering the list layout. Removed the text indicator from the list row since the avatar already has an absolute channel badge overlay.
BUG-05 Medium Timezones Dashboard local time and message timestamps displayed UTC (6 hours behind Bangladesh time), mismatching the laptop clock. Updated date rendering in Laravel views to explicitly cast datetimes to the Asia/Dhaka timezone.
BUG-06 High Thread Flow Sending a message or typing Enter triggered a full browser page reload, breaking chat flow. Refactored admin composer to post via AJAX fetch() request, returning JSON outputs from the backend store controller.
BUG-07 High Resiliency Optimistically appended message bubbles got stuck in a "sent" visual state even if the AJAX call failed. Implemented temp transaction IDs for optimistic updates. If fetch fails, the bubble gets a .failed-send red border with a clickable retry warning.

4. Engineering Best Practices

  1. Server-Side Rendered (SSR) Partials: Rather than coding heavy, complex JS engines to update the conversation sidebar list, we implemented SSR HTML updates. Polling calls /conversations-sidebar and replaces the list container's inner HTML, making the UI robust and easy to maintain.
  2. API Fetch Locks: Prevented race-conditions and overlapping queries by introducing fetch state locks (isLoadingHistory) in the widget scripts.
  3. Strict Security Authorization: Added backend route authorization checks to verify the authenticated user has active membership inside the conversation's organization before returning private message histories.

5. Future Roadmap & Recommendations